export interface ResponseData {
  code: number
  message: string
  ok: boolean
}
export type Records = SpuList[]
export interface SpuList {
  id?: number
  spuName: string
  description: string
  category3Id: number | string
  tmId: number | string
  spuSaleAttrList: null | spuSaleAttrData[]
  spuImageList: null | ImageWall[]
}
export interface SpuResponseData extends ResponseData {
  data: {
    records: Records
    total: number
    size: number
    current: number
    orders: []
    optimizeCountSql: boolean
    hitCount: boolean
    countId: null
    maxLimit: null
    searchCount: boolean
    pages: number
  }
}
//品牌信息下拉框数据请求
export interface SpuTradeMark {
  id?: number
  tmName: string
  logoUrl: string
}
export interface SpuTradeMarkResponse extends ResponseData {
  data: SpuTradeMark[]
}
//照片墙数据请求
export interface ImageWall {
  id?: number
  spuId?: number
  imgName?: string
  imgUrl?: string
  name?: string
  url?: string
}
export interface SpuImageWallResponse extends ResponseData {
  data: ImageWall[]
}
//spu已有销售属性列表值类型
export interface spuSaleAttrValue {
  id?: number
  spuId?: number
  baseSaleAttrId: number
  saleAttrValueName: string
  saleAttrName?: string
  isChecked?: null
}
export type SaleAttrValueList = spuSaleAttrValue[]
//spu已有销售属性列表属性名类型
export interface spuSaleAttrData {
  id?: number
  spuId?: number
  baseSaleAttrId: number
  saleAttrName: string
  spuSaleAttrValueList: spuSaleAttrValue[]
  flag?: boolean
  saleAttrValueName?: string
  saleIdAndValueId?: string
}
export interface spuSaleAttrValueResponse extends ResponseData {
  data: spuSaleAttrData[]
}
//销售属性下拉框值类型
export interface SaleAttrSelectData {
  id: number
  name: string
}
export interface SaleAttrSelectDataResponse extends ResponseData {
  data: SaleAttrSelectData[]
}
export interface AttrValue {
  //sku平台属性值和属性id
  attrId: number | string
  valueId: number | string
}
export interface SaleValue {
  saleAttrId: number | string
  saleAttrValueId: number | string
}
export interface AddSku {
  id?: number
  category3Id: number | string //三级分类id
  spuId: number | string //对应的spu的id
  tmId: number | string
  skuName: string
  price: number | string
  weight: number | string
  skuDefaultImg: string
  skuDesc: string
  skuAttrValueList: AttrValue[]
  skuSaleAttrValueList: SaleValue[]
}
//根据spuid查看sku对话框显示
export interface skuValue {
  price: number
  skuName: string
  weight: string
  skuDefaultImg: string
}
export interface skuValueData extends ResponseData {
  data: skuValue[]
}
